//
//  DiscoverCollectionViewCell.m
//  Coco_Music
//
//  Created by 强哥 on 15/6/22.
//  Copyright (c) 2015年 寇广超. All rights reserved.
//

#import "DiscoverCollectionViewCell.h"
#import "UIImageView+WebCache.h"


@implementation DiscoverCollectionViewCell

-(instancetype)initWithFrame:(CGRect)frame
{
    if ([super initWithFrame:frame]) {
        [self create];
    }
    
    return self;
}

-(void)create
{
    self.TitleLabel = [[UILabel alloc]initWithFrame:CGRectMake(10, 100, 100, 50)];
    [self.contentView addSubview: self.TitleLabel];
    self.TitleLabel.numberOfLines = 0;
    [self.TitleLabel release];
    
    self.ImageView = [[UIImageView alloc]initWithImage:[UIImage imageNamed:@"DAwKgDtlOHPZHgdJEEAAdi-BWrYJI010_mobile_large"]];
    self.ImageView.frame = CGRectMake(10, 5, 100, 100);
    [self.ImageView release];
    [self.contentView addSubview:self.ImageView];
    
}



-(void)setDiscover:(Discover *)discover
{
    NSString *string = discover.CollectionPic_url;
    NSURL *url = [NSURL URLWithString:string];
    self.TitleLabel.text = discover.CollectionName;
    [self.ImageView sd_setImageWithURL:url placeholderImage:[UIImage imageNamed:@"DAwKgDtlOHPZHgdJEEAAdi-BWrYJI010_mobile_large"]];

}



@end
